import Vue from "vue";
import Vuerouter from "vue-router";

Vue.use(Vuerouter);

const routes = [
  {
    path: "/index",
    name: "sport",
    component: () => import("@/views/sport-index.vue"),
  },
  {
    path: "/news",
    name: "news",
    component: () => import("@/views/sport-news.vue"),
  },
  {
    path: "/sport",
    name: "info",
    component: () => import("@/views/sport-info.vue"),
    children: [
      {
        path: "index",
        name: "index",
        component: () => import("@/views/sport-index-page.vue"),
      },
      {
        path: "insport",
        name: "in",
        component: () => import("@/views/sport-in.vue"),
      },
      {
        path: "outsport",
        name: "out",
        component: () => import("@/views/sport-out.vue"),
      },
    ],
  },
];

const router = new Vuerouter({
  mode: "history",
  base: process.env.BASE_URL,
  routes,
});
export default router;